package com.sgb.kjwl.view.ui.adapter.transport;

import android.content.Context;

import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.transport.ManageListEntity;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;

import java.util.List;

public class HomeManageCompanyListAdapter extends BaseRecycleAdapter<ManageListEntity> {

    public HomeManageCompanyListAdapter(Context context, List<ManageListEntity> data) {
        super(context, R.layout.item_manage_company_list, data);
    }

    @Override
    public void convert(ItemViewHolder holder, ManageListEntity entity) {
        String name = entity.getCompanyName();
        if (name.length() > 6) {
            name = name.substring(0, 6) + "...";
        }
        holder.setText(R.id.tv_manage_company_name, name+">");
    }
}
